﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Samples.CustomControls;

namespace EffectsTester.Pages
{
    /// <summary>
    /// Interaction logic for Sepia.xaml
    /// </summary>
    public partial class Sepia : Page
    {
        public Sepia()
        {
            InitializeComponent();
            lightColor.MouseUp += new MouseButtonEventHandler(lightColor_MouseUp);
            darkColor.MouseUp += new MouseButtonEventHandler(darkColor_MouseUp);
        }

        void darkColor_MouseUp(object sender, MouseButtonEventArgs e)
        {
            ColorPickerDialog dlg = new ColorPickerDialog();
            dlg.StartingColor = darkColorBrush.Color;
            dlg.ShowDialog();
            if (dlg.DialogResult == true)
            {
                darkColorBrush.Color = dlg.SelectedColor;
            }
        }

        void lightColor_MouseUp(object sender, MouseButtonEventArgs e)
        {
            ColorPickerDialog dlg = new ColorPickerDialog();
            dlg.StartingColor = lightColorBrush.Color;
            dlg.ShowDialog();
            if (dlg.DialogResult == true)
            {
                lightColorBrush.Color = dlg.SelectedColor;
            }
        }
    }
}
